<extend name="Index/index" />
<block name="head">
<style type="text/css">
    #pages a,#pages span{
        background-color: #fff;
        border: 1px solid #ddd;
        color: #337ab7;
        float: left;
        line-height: 1.42857;
        margin-left: -1px;
        padding: 6px 12px;
        position: relative;
        text-decoration: none;
    }
    #pages span{
        background:#337ab7;
        color:white;
    }
</style>
</block>
<block name="center">
<div class="col-lg-12" style="padding-left:0px;padding-right:0px;">
	<div class="note note-info" style="height:50px;line-height:50px;margin:0px;">
    	<h4 class="box-heading">产品列表</h4>
	</div>
    <div class="portlet box">
        <!-- <div class="portlet-header">
            <div class="caption">美食列表</div>
        </div> -->
        <div class="portlet-body">
            <div class="table-responsive">
                <div id="example1_wrapper" class="dataTables_wrapper form-inline no-footer">
                    <form action="{:U('Admin/Foods/index')}" method="get">
                        <div class="row">
                        
                            <div class="col-md-5" style="width:200px">
                                <div class="dataTables_length" id="example1_length">
                                    <label>显示 
                                        <select name="num" aria-controls="example1" class="form-control input-sm">
                                            <option value="10" <if condition="$_GET['num'] eq 10">selected  </if>  >10</option>
                                            <option value="25" <if condition="$_GET['num'] eq 25">selected  </if> >25</option>
                                            <option value="50" <if condition="$_GET['num'] eq 50">selected  </if> >50</option>
                                        </select> 条
                                    </label>
                                </div>
										sss
                            </div>
                            <div class="col-md-4">
                                <div class="input-group input-group-sm mbs" style="width:600px;">
                                    <div class="dataTables_length" id="example1_length" style="float:left;margin-top:5px;margin-right:10px;">
                                        产品名称:
                                	</div>
                                	<div style="float:left;width:300px;">
                                    <input type="text" class="form-control input-sm" placeholder="" aria-controls="example1" name="keywords" value="{:empty($_GET['keywords'])? '' :$_GET['keywords']}">
                                    <span class="input-group-btn" >
                                        <button class="btn btn-success dropdown-toggle"  style="margin-left:10px;">搜索</button>
                                        
                                    </span>
                                    </div>
                                   
                                </div>
                            </div>
                            <div class="col-md-3">
                                <div id="example1_filter" class="dataTables_filter">
                                    <label>
                                        
                                    </label>
                                </div>
                            </div>
                        </div>
                    </form>    
                        
                    <table class="table table-striped table-bordered table-hover dataTable no-footer" style="border-bottom:1px solid #ddd" id="example1" role="grid">
                        <thead>
                            <tr role="row">
                                <th class="sorting_asc" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 55px;" aria-label="Rendering engine: activate to sort column ascending" aria-sort="ascending">ID</th>
                                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 150px;" aria-label="Browser: activate to sort column ascending">名称</th>
                                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 150px;" aria-label="Platform(s): activate to sort column ascending">价格</th>
                                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 150px;" aria-label="Engine version: activate to sort column ascending">所属分类</th>
                                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 200px;" aria-label="CSS grade: activate to sort column ascending">上架时间</th>
                                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 100px;" aria-label="Edit: activate to sort column ascending">状态</th>
                                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 100px;" aria-label="Edit: activate to sort column ascending">起批量</th>
                                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 100px;" aria-label="Edit: activate to sort column ascending">规格</th>
                                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 40px;" aria-label="Delete: activate to sort column ascending">修改</th>
                                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 40px;" aria-label="Delete: activate to sort column ascending">删除</th>
                            </tr>
                        </thead>
                        <tbody>
                            <foreach name="info" item="vo">
                            <tr class="gradeX odd" role="row">
                                <td class="sorting_1">{$vo['id']}</td>
                                <td>{$vo['name']}</td>
                                <td>{$vo['price']}</td>
                                <td class="center">{$vo['cname']}</td>
                                <td class="center">{:date('Y-m-d H:i:s',$vo["addtime"])}</td>
                                <td class="center">
                                    <if condition="$vo['fstatus'] eq 1">在售卖
                                    <else /> 未售卖
                                    </if>
                                </td>
                                <td class="center">{$vo['number']}</td>
                                <td class="center">{$vo['Specifications']}</td>
                                <td>
                                    <a class="edit" href="{:U('Admin/Foods/edit',array(id=>$vo['id']))}">
                                        <button type="button" class="btn btn-default btn-xs"><i class="fa fa-edit"></i>&nbsp; Edit</button>
                                    </a>
                                </td>
                                <td>
                                    <a class="delete" href="{:U('Admin/Foods/delete',array(id=>$vo['id']))}">
                                        <button type="button" class="btn btn-danger btn-xs"><i class="fa fa-trash-o"></i>&nbsp; Delete</button>
                                    </a>
                                </td>
                            </tr>
                            </foreach>
                        </tbody>
                    </table>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="dataTables_length">
                            </div>
                        </div>
                        <div class="col-md-6" >
                            <div class="dataTables_paginate paging_simple_numbers" id="example1_paginate">
                                <ul class="pagination" style="margin-left:200px">
                                    <li class="paginate_button previous" aria-controls="example1" tabindex="0" id="example1_previous">
                                        <div id="pages">{$pages}</div>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="__PUBLIC__/js/jquery-1.8.3.min.js"></script>

</block>